#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int is_leap_year(int y)
{
	return ((y % 4 == 0) && (0 != y % 100)) || (y % 400 == 0);
}
int main()
{
	for (int y = 1000; y <= 2000; y += 4)
	{
		if (is_leap_year(y))
			printf("%-8d", y);
	}
}